package com.jx.driving.response;

import com.jx.driving.message.TimeTerminalResponseMessage;
import com.jx.driving.protocol.terminal.annotation.ByteAnnotation;
import com.jx.driving.protocol.terminal.annotation.WordAnnotation;

public class AbstractResponse extends TimeTerminalResponseMessage {

    @WordAnnotation(order = 1)
    protected Integer sequence;// 流水号

    @WordAnnotation(order = 2)
    protected Integer id;// id

    @ByteAnnotation(order = 3)
    protected short result;// 结果0：成功/确认；1：失败；2：消息有误；3：不支持

    public Integer getSequence() {
	return sequence;
    }

    public void setSequence(Integer sequence) {
	this.sequence = sequence;
    }

    public Integer getId() {
	return id;
    }

    public void setId(Integer id) {
	this.id = id;
    }

    public short getResult() {
	return result;
    }

    public void setResult(short result) {
	this.result = result;
    }

    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("AbstractResponse [sequence=").append(sequence).append(", id=").append(id).append(", result=")
		.append(result).append("]");
	return builder.toString();
    }

}
